package com.googlecode.wicketcharts.highcharts.options;

/**
 * Describes either a pixel value or a percentage value.
 * 
 * @see <a
 *      href="http://api.highcharts.com/highcharts#plotOptions.pie.innerSize">http://api.highcharts.com/highcharts#plotOptions.pie.innerSize</a>
 *      and others
 * @author Tom Hombergs (tom.hombergs@gmail.com)
 * 
 */
public class PixelOrPercent extends JsonObject {

	private static final long serialVersionUID = 1L;

	private final int value;

	private final Unit unit;

	public enum Unit {
		PERCENT,

		PIXELS;
	};

	public PixelOrPercent(int value, Unit unit) {
		this.value = value;
		this.unit = unit;
	}

	public Unit getUnit() {
		return unit;
	}

	public int getValue() {
		return value;
	}

}
